package com.ruanda.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruanda.constant.StoreConstants;
import com.ruanda.domain.Area;
import com.ruanda.service.AreaService;
import com.ruanda.mapper.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 亦樂
* @description 针对表【area】的数据库操作Service实现
* @createDate 2024-09-06 14:26:11
*/
@Service
@CacheConfig(cacheNames = "com.ruanda.service.impl.AreaServiceImpl")
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area>
    implements AreaService{

    @Autowired
    private AreaMapper areaMapper;
    
    @Override
    @Cacheable(key = StoreConstants.ALL_AREA_KEY)
    public List<Area> queryAllAreaList() {
        return areaMapper.selectList(null);
    }
}




